package br.com.scanner;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import java.util.regex.Pattern;

public class LendoArquivo {

	public static void main(String[] args) {

		try{
			Scanner s = new Scanner(new File("arquivo.txt"));
			int i=1;
			s.useDelimiter(Pattern.compile("\n"));
			while (s.hasNext()){
				System.out.println(s.next() + " - "+i++);
			}
			s.close();
		}
		catch(FileNotFoundException e){
			
		}
		
	}
	
}
